package edu.uit.se.laps.web.controller;

import java.io.Serializable;
import java.util.List;

import edu.uit.se.laps.web.model.TaiKhoan;

public class TaiKhoanSession implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 6473365088535399013L;
	
	private String email;
	private TaiKhoan tk;				//luu tai khoan user/admin
	private TaiKhoanManager tkManager;
	private TaiKhoan tkTemp;			//luu tai khoan khi update
	
	//private TaiKhoan tkadmin;			//luu tai khoan
	
	public TaiKhoanSession(){
		tkManager = new TaiKhoanManager();
	}

	public TaiKhoan getTk() {
		tk = tkManager.getUser(email);
		return tk;
	}

	public void setTk(TaiKhoan tk) {
		this.tk = tk;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	public List<TaiKhoan> getTKList(){
		return tkManager.list();
	}

	public TaiKhoan getTkTemp() {
		return tkTemp;
	}

	public void setTkTemp(TaiKhoan tkTemp) {
		this.tkTemp = tkTemp;
	}

//	public TaiKhoan getTkadmin() {
//		return tkadmin;
//	}
//
//	public void setTkadmin(TaiKhoan tkadmin) {
//		this.tkadmin = tkadmin;
//	}
	
}
